package Cn.Sarkar.IMS.DataBaseDefinations

import Cn.Sarkar.Entities.Common.Table
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.*
import Cn.Sarkar.IMS.Entities.Type

object Products : Table("Product") {
    override var Comment: String = "مەھسۇلات"
    val NameID = intColumn("NameID") reference Names.ID
    val DescriptionID = intColumn("DescriptionID") reference Descriptions.ID
    val Image = stringColumn("Image") size 255 comment "رەسىم"
    val TypeID = intColumn("TypeID") reference Types.ID comment "تۈرى"
    val UnitID = intColumn("UnitID") reference Units.ID comment "بىرلىكى"
    val StampID = intColumn("StampID") reference Stamps.ID comment "ماركىسى"

    override val CATEGORY: Int = 11

    init {
        unique(NameID, TypeID, UnitID, StampID)
    }
}